/**
CUtils.h: Some global helper functions
**/
#pragma once

#ifndef _CUTIL_H_
#define _CUTIL_H_
#define M_PI   3.14159265358979323846
class CUtil {
public:
	static int CUtil::getINIint(char * file, char * section, char * variable);
	static float CUtil::getINIdouble(char * file, char * section, char * variable);
	static char * CUtil::getINIstring(char * file, char * section, char * variable, char * output);
	static char * CUtil::my_strtok(char * input, char * delim);
	static char * CUtil::trim(char * input);
	static float CUtil::distance(struct position A, struct position B);
	static float CUtil::calcAngle( float Position1X, float Position1Y, float Position2X, float Position2Y );
	static bool  CUtil::withinDistance(float x1, float x2, float z1, float z2, struct position A);
	static bool  CUtil::withinDistance(float x1, float x2, float y1, float y2, float z1, float z2, struct position A);
	static char * CUtil::getJobString(int jobId);
	static double CUtil::round(double x);
	static float CUtil::randFloat(float a, float b);
	// get zone name as string
	static const char * CUtil::getZoneName(unsigned short zone);
	static char * CUtil::getWeaponSkillName(int skillid);
	static void CUtil::importZone(char * filename);
	static void CUtil::exportZones(void);
	// temp functions, to be removed again
	static void CUtil::fillNewTable(unsigned short zone);
	static void CUtil::groupNewTable();
	static void CUtil::buildIdPool();
	static int CUtil::rotateLeft(int number, int bits);

	static void CUtil::updateAnimIds();
};

#endif